<?php
$on_sidebar = $vars['on_sidebar'];
if(!$on_sidebar) {
	$name = elgg_view('output/url', array(
  		'href' => "golfscore/view?golf_score_id=" . $vars['item']->golf_score_id,
  		'text' => $vars['item']->course_name,
  		));
?>
<p>
  <span class="elgg-list-item-date"><?php echo $vars['item']->input_date; ?></span>
  <span class="elgg-list-item-course"><?php echo $name; ?></span>
  <span class="elgg-list-item-score"><?php echo $vars['item']->esc_adjustment_total_score; ?></span>
</p>
<?php 
} else {
	$input_date = date('m/d', strtotime($vars['item']->input_date));
	$user_full_name = elgg_view('output/url', array(
			'href' => "profile/" . $vars['item']->user_name,
			'text' => $vars['item']->user_full_name,
	));
	$course_name = elgg_view('output/url', array(
			'href' => "golfscore/view?golf_score_id=" . $vars['item']->golf_score_id,
			'text' => $vars['item']->course_name,
	));
?>
<p>
  <span class="elgg-list-item-date-sidebar"><?php echo $input_date; ?></span>
<?php 
$view_type = $vars['view_type'];
if($view_type == 'all') {
?>
  <span class="elgg-list-item-user-sidebar"><?php echo $user_full_name; ?></span>
<?php
}
?>
  <span class="elgg-list-item-course-sidebar"><?php echo $course_name; ?></span>
  <span class="elgg-list-item-score-sidebar"><?php echo $vars['item']->esc_adjustment_total_score; ?></span>
</p>
<?php
} 
?>